/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.uefs.cedoc.entidade;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author suporte
 */
@Entity
@Table(name = "parteI")
@NamedQueries({@NamedQuery(name = "ParteI.findByIdparteI", query = "SELECT p FROM ParteI p WHERE p.idparteI = :idparteI"), @NamedQuery(name = "ParteI.findByNome", query = "SELECT p FROM ParteI p WHERE p.nome = :nome"), @NamedQuery(name = "ParteI.findByPrenome", query = "SELECT p FROM ParteI p WHERE p.prenome = :prenome")})
@NamedQuery(name = "ParteI.findLikeName", query = "SELECT s FROM ParteI s WHERE LOWER(s.nome) LIKE :searchString")

public class ParteI implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Column(name = "idparteI", nullable = false)
    private Integer idparteI;
    @Column(name = "nome")
    private String nome;
    @Column(name = "prenome")
    private String prenome;

    public ParteI() {
    }

    public ParteI(Integer idparteI) {
        this.idparteI = idparteI;
    }

    public Integer getIdparteI() {
        return idparteI;
    }

    public void setIdparteI(Integer idparteI) {
        this.idparteI = idparteI;
    }

    public String getNome() {
        return nome;
    }

    public void setNome(String nome) {
        this.nome = nome;
    }

    public String getPrenome() {
        return prenome;
    }

    public void setPrenome(String prenome) {
        this.prenome = prenome;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idparteI != null ? idparteI.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ParteI)) {
            return false;
        }
        ParteI other = (ParteI) object;
        if ((this.idparteI == null && other.idparteI != null) || (this.idparteI != null && !this.idparteI.equals(other.idparteI))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "br.uefs.cedoc.entidade.ParteI[idparteI=" + idparteI + "]";
    }

}
